<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>消息编辑</title>
    <?php require 'templates/common/head.html'; ?>
    <script src="../app/js/common.js"></script>
    <style>
        *{line-height: 30px;}
        form div{ margin: 10px 0; min-height: 40px; height: auto;}
        .input_1{height: 35px;  line-height: 35px;width: 70%; float: left;}
        .left_title{display:block; height: 35px; line-height: 35px; vertical-align: middle; width: 100px; text-align: right; float: left; padding-right: 10px; clear: both;}
        .right_content{display: block; float: left; width: 70%;}
    </style>
</head>
<body>
<div class="container-fluid">
    <?php require 'templates/common/nav.html'; ?>
    <div class="panel panel-primary">
        <div class="panel-heading text-center"><h3 class="panel-title">消息编辑</h3></div>
        <div class="panel-body">
            <form action="" method="post" id="form">
                <div>
                    <span class="left_title">图文消息标题:</span>
                    <input type="text" name="pt_title" value="<?=$do->get_pt_title()?>" class="input_1"/>
                </div>
                <div>
                    <span class="left_title">图文消息描述:</span>
                    <input type="text" name="pt_desc" value="<?=$do->get_pt_desc()?>" class="input_1"/>
                </div>
                <div <?php if(!$do->get_pt_pic()):?>style="display: none;"<?php endif;?>>
                    <span class="left_title"></span>
                    <img src="<?=$do->get_pt_pic()?>" width="500" id="pic_view">
                </div>
                <div>
                    <span class="left_title">图片:</span>
                    <input type="hidden" name="pt_pic" id="pt_pic" value="<?=$do->get_pt_pic()?>" class="input_1"/>
                    <input type="file" id="uploadPic" name="uploadPic" value=""></button>
                </div>

                <div>
                    <span class="left_title">模板消息头:</span>
                    <input type="text" name="template_first" value="<?=$do->get_template_first()?>" class="input_1"/>
                </div>

                <div>
                    <span class="left_title">消息类别:</span>
                    <input type="text" name="template_keyword1" value="<?=$do->get_template_keyword1()?>" class="input_1"/>
                </div>

                <div>
                    <span class="left_title">发布人:</span>
                    <input type="text" name="template_keyword2" value="<?=$do->get_template_keyword2()?>" class="input_1"/>
                </div>

                <div>
                    <span class="left_title">发布时间:</span>
                    <input type="text" name="template_keyword3" value="<?=$do->get_template_keyword3()?>" class="input_1"/>
                </div>

                <div>
                    <span class="left_title">模板消息尾:</span>
                    <input type="text" name="template_remark" value="<?=$do->get_template_remark()?>" class="input_1"/>
                </div>

                <div>
                    <span class="left_title">消息链接:</span>
                    <input type="text" name="url" value="<?=$do->get_url()?>" class="input_1"/>
                </div>

                <div>
                    <span class="left_title">发送对象:</span>
                    <span class="right_content">
                        <select name="isForAllUser" id="isForAllUser">
                            <option value="1" <?php if($do->get_isForAllUser() == '1'):?>selected="selected"<?php endif;?>>全部用户</option>
                            <option value="0" <?php if($do->get_isForAllUser() == '0'):?>selected="selected"<?php endif;?>>筛选</option>
                        </select>
                        <br/>
                        <span class="filter" <?php if($do->get_isForAllUser() == '1'):?>style="display: none"<?php endif;?>>
                        <b>类别</b>
                        医生<input name="userType[]" type="checkbox" value="医生">
                        护士<input name="userType[]" type="checkbox" value="护士">
                        医学生<input name="userType[]" type="checkbox" value="医学生">
                        <br/>
                        <b>职称</b>
                        主任医师<input name="title[]" type="checkbox" value="主任医师">
                        副主任医师<input name="title[]" type="checkbox" value="副主任医师">
                        主治医师<input name="title[]" type="checkbox" value="主治医师">
                        住院医师<input name="title[]" type="checkbox" value="住院医师">
                        <br/>
                        <b>医院等级</b>
                        三级特等<input name="hospitalLevel[]" type="checkbox" value="三级特等">
                        三级甲等<input name="hospitalLevel[]" type="checkbox" value="三级甲等">
                        三级乙等<input name="hospitalLevel[]" type="checkbox" value="三级乙等">
                        三级丙等<input name="hospitalLevel[]" type="checkbox" value="三级丙等">
                        二级甲等<input name="hospitalLevel[]" type="checkbox" value="二级甲等">
                        二级乙等<input name="hospitalLevel[]" type="checkbox" value="二级乙等">
                        二级丙等<input name="hospitalLevel[]" type="checkbox" value="二级丙等">
                        一级甲等<input name="hospitalLevel[]" type="checkbox" value="一级甲等">
                        一级乙等<input name="hospitalLevel[]" type="checkbox" value="一级乙等">
                        一级丙等<input name="hospitalLevel[]" type="checkbox" value="一级丙等">
                        其他<input name="hospitalLevel[]" type="checkbox" value="其他">
                        <br/>
                        <b>地区</b>
                        <input type="text" name="province" placeholder="省" style="width: 80px;" />
                        <input type="text" name="city" placeholder="市" style="width: 80px;" />
                        <br>除去专家<input name="noExpert" type="checkbox" value="1">
                       &nbsp;通过认证<input name="onlyPass" type="checkbox" value="1">
                        <br>
                        <div style="background-color: #dddddd; padding: 0 3px;"><?=$do->get_note()?></div>
                        </span>
                    </span>
                </div>

                <div>
                    <span class="left_title"></span>
                    <span class="right_content" style="text-align: center">
                        <input type="submit" value="提交">
                    </span>
                </div>
            </form>
        </div>
    </div>
</div>
<?php require 'templates/common/foot.html'; ?>
<script src="../business/js/ajaxfileupload.js"></script>
</body>
</html>